package cn.aiyuan.entity.role;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.sql.Timestamp;

/**
 * 角色表(Role)实体类
 *
 * @author 痴
 * @since 2020-04-30 14:11:57
 */
@Data
@ApiModel(value = "RoleDO", description = "角色表")
@TableName("role")
public class Role implements Serializable {

	private static final long serialVersionUID = -67412668012087609L;

	@ApiModelProperty(name = "id", value = "表唯一标识")
	@JsonProperty("id")
	private Long id;

	@ApiModelProperty(name = "appellation", value = "角色名称")
	@JsonProperty("appellation")
	private String name;

	@ApiModelProperty(name = "num", value = "角色编码")
	@JsonProperty("num")
	private String code;

	@ApiModelProperty(name = "desc", value = "角色描述")
	@JsonProperty("desc")
	private String description;

	@ApiModelProperty(hidden = true)
	@JsonIgnore
	private Boolean deleted;

	@ApiModelProperty(name = "init", value = "是否为初始角色 禁止删除编辑")
	@JsonProperty("init")
	private Boolean initial;

	@ApiModelProperty(name = "default", value = "是否默认角色")
	@JsonProperty("default")
	private Boolean def;

	@ApiModelProperty(name = "ena", value = "是否启用 true 启用 false 禁用")
	@JsonProperty("ena")
	private Boolean enable;

	@ApiModelProperty(name = "crTime", value = "创建时间", hidden = true)
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	@JsonProperty(value = "crTime")
	private Timestamp createTime;

	@ApiModelProperty(name = "crId", value = "创建人", hidden = true)
	@JsonProperty(value = "crId")
	private Long createId;

	@ApiModelProperty(name = "upTime", value = "修改时间", hidden = true)
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	@JsonProperty(value = "upTime")
	private Timestamp updateTime;

	@ApiModelProperty(name = "upId", value = "修改人", hidden = true)
	@JsonProperty(value = "upId")
	private Long updateId;

}
